package com.ganbo.cloud.order;

import com.ganbo.cloud.feign.clients.UserClient;
import com.ganbo.cloud.feign.config.DefaultFeignConfiguration;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;

/**
 * @author ganbo
 * @date 2022/10/19 15:08
 */
@MapperScan("com.ganbo.cloud.order.mapper")
@SpringBootApplication
//@EnableFeignClients(clients = UserClient.class, defaultConfiguration = DefaultFeignConfiguration.class)
@EnableFeignClients(basePackages = "com.ganbo.cloud.feign", defaultConfiguration = DefaultFeignConfiguration.class)
public class OrderApplication {

    public static void main(String[] args) {
        SpringApplication.run(OrderApplication.class, args);
    }

    //配置全局的ribbon负载均衡策略为随机
//    @Bean
//    public IRule randomRule() {
//        return new RandomRule();
//    }
}
